package net.lab1024.sa.admin.module.business.order.dao;

import java.time.LocalDateTime;
import java.util.List;

import net.lab1024.sa.admin.module.business.order.domain.entity.OrderEntity;
import net.lab1024.sa.admin.module.business.order.domain.form.OrderQueryForm;
import net.lab1024.sa.admin.module.business.order.domain.vo.OrderNum;
import net.lab1024.sa.admin.module.business.order.domain.vo.OrderNumVO;
import net.lab1024.sa.admin.module.business.order.domain.vo.OrderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 订单 Dao
 *
 * @Author syf
 * @Date 2025-05-16 10:02:50
 * @Copyright 畅想科技
 */

@Mapper
@Component
public interface OrderDao extends BaseMapper<OrderEntity> {

    /**
     * 分页 查询
     *
     * @param page
     * @param queryForm
     * @Param id
     * @Param orderEntity
     * @return
     */
    List<OrderVO> queryPage(Page page, @Param("queryForm") OrderQueryForm queryForm);

    OrderVO detail(@Param("id") String id);

    List<OrderVO> queryOrderByJdyId(@Param("id") String id);

    int updatebyId(@Param("orderEntity")OrderEntity orderEntity);

    List<OrderVO> queryPageOrderByTime(Page<?> page, @Param("queryForm") OrderQueryForm queryForm);

    List<OrderEntity> selectExpiredOrders(LocalDateTime deadTime);
    List<OrderNumVO> selectOrderNums();
//    List<OrderEntity> selectUselessOrders();
//
//    void deleteByOrderId(String orderId);
}
